#!/usr/bin/python

f = open('/etc/passwd','r')
users = [x.split(":")[0] for x in f]
f.close()
userName = input("请输入用户名:")
if userName in users:
    print("用户存在")
else:
    print("用户存在")